import { request } from './base'
export default {
    //市场用户分页查询
    getMarketUser(data) {
        return request("trade/marketUser/page", "post", data)
    },
    //创建采购单(市场)
    createOrder(data) {
        return request("trade/purchase/order/marketer/create", "post", data)
    },
    //更新采购单
    updateOrderList(data) {
        return request("trade/purchase/order/update", "post", data)
    },
    //备货订单分页查询(市场端)  小工
    marketerPage(data) {
        return request("trade/outStock/marketer/page", "post", data)
    },
    //采购单分页查询(市场端)  市场
    orderMarketerPage(data) {
        return request("trade/purchase/order/marketer/page", "post", data)
    },
    //查看备货(出库)单详情
    getOutInfo(id){
        return request(`trade/outStock/info/${id}`, "get")
    },
    //根据市场ID查询包装集合
    getPackAll(companyId){
        return request(`trade/packAndMateriel/getAll/${companyId}`, "get")
    },
    //小工备货
    workerChange(data) {
        return request("trade/outStock/worker/update", "post", data)
    },
    //更新备货单(管理员)
    updateList(data) {
        return request("trade/outStock/marketer/update", "post", data)
    },
    //查看采购单详情
    getOrderInfo(id){
        return request(`trade/purchase/order/info/${id}`, "get")
    },
    //发货完成
    completeList(data){
        return request("trade/outStock/delivery/complete", "post", data)
    },
    //采购订单完成
    orderComplete(data){
        return request("trade/purchase/order/complete", "post", data)
    },
    //市场入库交易数据统计(卖货净重,交易次数,总货款)
    enterStockReport(companyId){
        return request(`trade/statistics/enterStock/market/transaction/report/${companyId}`, "get")
    },
		//市场入库交易数据统计-具体农户(卖货净重,交易次数,总货款)
		enterTransactionReport(companyId,farmerUserId){
			return request(`trade/statistics/enterStock/market/transaction/report/${companyId}/${farmerUserId}`, "get")
		},
		//市场出库交易数据统计-具体货主(发货净重,发货次数,总货款)
		outStockTransactionReport(companyId,ownerUserId){
			return request(`trade/statistics/outStock/market/transaction/report/${companyId}/${ownerUserId}`, "get")
		},
		//打印备货单小票
		printOutStock(id){
			return request(`trade/outStock/print/${id}`, "post")
		},
}